CLAUDE.md: relax Reason interface invariant to match demo reality - #18
Conversation
The absolute "always define an …Interface" rule in §3 #8 was not followed by the canonical demos themselves — across all eight demos concrete Reason injection is used freely for pure-policy classes (IncomePolicy, JTASProtocol, EmailNormalizer, PasswordHasher, SlugGenerator, ExcerptExtractor, CoverageValidator, etc.), and interfaces are reserved for Reasons at external I/O boundaries (PaymentGateway, CreditBureau, DamageAppraiser, AdjusterAllocator, FraudDetector, InsuranceQuoter, PropertyAppraisal, EmailVerifier, AuthorResolver, PolicyRegistry, PaymentProcessor, InventoryReserver, ShippingArranger). The invariant now documents that observed policy instead of mandating a rule nothing obeys.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 35 minutes and 15 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
CLAUDE.md§3 #8 declared an absolute rule — "always define an…Interfaceand depend on the interface, never the concrete class" — that the canonical demos themselves do not follow. A cross-demo audit of every#[Inject]site revealed a consistent, different policy in practice:PaymentGatewayInterface,CreditBureauInterface,DamageAppraiserInterface,AdjusterAllocatorInterface,FraudDetectorInterface,InsuranceQuoterInterface,PropertyAppraisalInterface,EmailVerifierInterface,AuthorResolverInterface,PolicyRegistryInterface,PaymentProcessorInterface,InventoryReserverInterface,ShippingArrangerInterface.IncomePolicy,JTASProtocol,EmailNormalizer,PasswordHasher,SlugGenerator,ExcerptExtractor,MarkdownRenderer,CoverageValidator,ClaimRegistrar,GravatarResolver,CardValidator,InventoryChecker,WarehouseLocator,CarrierSelector,AddressValidator.This PR rewrites §8 to document that observed policy, so code-generating assistants stop being told to always introduce an interface — which would add noise to pure-policy Reasons and make the demos less representative.
Related
PaymentAuthorizedas depending on a concretePaymentGateway. That specific case is a real issue (payment gateway is an external boundary) but is pre-existing; it can be addressed separately now that the invariant is clarified.Test plan
#[Inject]site indemos/*/src/Being/anddemos/*/src/Moment/.